<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
</html>
<script>
	//随机10个成绩(1-100)添到数组中， 求大于等于平均成绩的个数。打印到控制台
	
	let score = new Array();
	console.log(score);
	let sum = 0;
	let num = 0;
		
	for(let i = 0; i<10; i++){
		score[i] = parseInt(Math.random() * 100 + 1);
		sum = sum + score[i];
	}
	console.log(score);
	let avg = sum / score.length;
	console.log(avg);
	
	for(let i = 0; i<10; i++){
		if(score[i] >= avg){
			console.log(score[i]);
			num += 1;
		}
	}
	console.log(num);
	
</script>

